Skip to content

feat: Get rid of MessageState::{OutPreparing, OutMdnRcvd} in the db#8127

Merged
iequidoo merged 1 commit intomainfrom
iequidoo/drop-unused-message-states
May 7, 2026
Merged

feat: Get rid of MessageState::{OutPreparing, OutMdnRcvd} in the db#8127
iequidoo merged 1 commit intomainfrom
iequidoo/drop-unused-message-states

Conversation

@iequidoo
Copy link
Copy Markdown
Collaborator

@iequidoo iequidoo commented Apr 14, 2026

OutPreparing is deprecated since 2024-12-07, replace it with OutFailed, such messages are
probably not interesting anymore. OutMdnRcvd is not used in the db for new messages since
a30c6ae, OutDelivered is stored instead.

Noticed this when doing #8121

@iequidoo iequidoo force-pushed the iequidoo/drop-unused-message-states branch 2 times, most recently from 1a27244 to f5322d2 Compare April 14, 2026 13:45
@iequidoo

This comment was marked as resolved.

@iequidoo iequidoo marked this pull request as ready for review April 14, 2026 14:13
@iequidoo iequidoo marked this pull request as draft April 15, 2026 18:30
@iequidoo iequidoo force-pushed the iequidoo/drop-unused-message-states branch 2 times, most recently from f5322d2 to 7051a48 Compare April 16, 2026 14:55
@iequidoo iequidoo marked this pull request as ready for review April 16, 2026 15:32
@iequidoo iequidoo force-pushed the iequidoo/drop-unused-message-states branch 2 times, most recently from 85ec8ce to b8b8e30 Compare April 17, 2026 18:54
@iequidoo iequidoo force-pushed the iequidoo/drop-unused-message-states branch from b8b8e30 to 0b78fba Compare May 1, 2026 15:35
Comment thread src/sql/migrations.rs Outdated
sql.execute_migration(
"
UPDATE msgs SET state=26 WHERE state=28; -- Change OutMdnRcvd to OutDelivered.
UPDATE msgs SET state=19 WHERE state=18; -- Change OutPreparing to OutDraft.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be OutDraft; if a message has been in OutPreparing for over a year, then it's not interesting anymore. Can be OutDelivered or OutFailed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, OutFailed looks good

Copy link
Copy Markdown
Collaborator

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after comment is addressed

`OutPreparing` is deprecated since 2024-12-07, replace it with `OutFailed`, such messages are
probably not interesting anymore. `OutMdnRcvd` is not used in the db for new messages since
a30c6ae, `OutDelivered` is stored instead.
@iequidoo iequidoo force-pushed the iequidoo/drop-unused-message-states branch from 0b78fba to 8bd0ef5 Compare May 7, 2026 23:29
@iequidoo iequidoo merged commit ca70fb9 into main May 7, 2026
30 of 31 checks passed
@iequidoo iequidoo deleted the iequidoo/drop-unused-message-states branch May 7, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants